//
//  PictureViewController.m
//  MyProject
//
//  Created by 石小强 on 2018/6/2.
//  Copyright © 2018年 yanjiaming. All rights reserved.
//

#import "PictureViewController.h"

@interface PictureViewController ()

@end

@implementation PictureViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.imgView.image = self.img;
    
    self.imgView.userInteractionEnabled = YES;
    UITapGestureRecognizer *tgr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imgViewClick)];
    [self.imgView addGestureRecognizer:tgr];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self imgViewClick];
}

- (void)imgViewClick {
    [self dismissViewControllerAnimated:NO completion:nil];
}

@end
